package com.hc.threadpool.controller;

import com.hc.threadpool.service.ThreadPoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: huangcheng
 * @CreateTime: 2023-09-06  10:22
 * @Description:
 * @Version: 1.0
 */
@RestController
public class JdkThreadPoolController {
    @Autowired
    private ThreadPoolService threadPoolService;


    @RequestMapping("/testJdkSyncThread")
    public String testJdkSyncThread(){
        threadPoolService.testJdkSyncThread();
        return "testJdkSyncThread";
    }

    @RequestMapping("/testJdkThreadPool")
    public String testJdkThreadPool(){
        threadPoolService.testJdkThreadPool();
        return "testJdkThreadPool";
    }
}
